#pragma once

#include "Game/Scene/Entity.h"
#include "Render/Buffer/VertexBuffer.h"
#include "Render/Buffer/IndexBuffer.h"


struct TextureMaterial
{
	TextureMaterial() = default;
	TextureMaterial(const std::string& color, const std::string& normal) :
		colorPath(color),
		normalPath(normal)
	{}
	std::string colorPath;
	std::string normalPath;
};

struct LightMaterial
{
	LightMaterial() = default;
	LightMaterial(glm::vec4 tar, glm::vec4 col) :
		target(tar),
		color(col)
	{}
	glm::vec4 target;
	glm::vec4 color;
};

class LocalEntity : public Entity
{
public:

	LocalEntity(entt::entity handle, GameScene* gameScene) : Entity(handle, gameScene) {};

	void SetColor(glm::vec4 color);

protected:

	virtual void ReleaseResource() override;

	virtual void OnTick(float deltaTime) override;

public:

	// For Local Scene
	glm::vec4 mColor;

	DescriptorMask mDescriptorMask;

	RefCountPtr<VertexBuffer> mVertexBuffer;

	RefCountPtr<IndexBuffer> mIndexBuffer;

	RefCountPtr<RHIBuffer> mUboBuffer;

	RefCountPtr<RHITexture> mColorTexture;

	RefCountPtr<RHITexture> mNormalTexture;

	RefCountPtr<RHISampler> mColorSampler;

	RefCountPtr<RHISampler> mNormalSampler;
};